package com.net.common.util;

import lombok.SneakyThrows;

import java.io.Closeable;
import java.util.Objects;

/**
 * @author hjh
 */
public class CloseableUtils {

    @SneakyThrows
    public static void close(Closeable... closeables) {
        for (Closeable closeable : closeables) {
            if (Objects.isNull(closeable)) {
                continue;
            }
            closeable.close();
        }
    }
}
